#!/bin/sh

rm -rf ./.start.log
touch ./.start.log

while [ 1 ]
do
	echo -------------- start------------------
	sh ./tomcat6/bin/catalina.sh run
	
	#write restart log 
	currentTime=`date`
	echo Unexpected error encountered, server restarted. Time: >> ./.start.log
	echo $currentTime >> ./.start.log
	echo --------------restart---------------------------------------------------------------------------------------------------------------------------------------------
	sleep 5
done

